Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Defining a pop-up menu
Nearly any visual object, with a few exceptions such as images and rectangles, can have a pop-up menu that you activate with the right mouse button. The pop-up menu uses the same syntax as the menu bar, except that you omit the keyword
MENUBAR:
Pop-up menus can contain menu items, submenus, rules, and skips.
![]()
To define a pop-up menu in the sample window:
- Go into the object’s property sheet and select the Pop-Up Menu button
. This brings up the same menu property sheet as before.
- Define a pop-up menu for the Order browse and call it m_OrderBrowse.
- Define menu items called By OrderNum, By OrderDate, By ShipDate, and By PO.
- Following these items, add a
RULE.- Add one more item called No ShipDate:
![]()
- Define a
CHOOSEtrigger for each item.For the first four menu items, you want to sort the Orders by the appropriate field by reopening the Order query with a different
BYclause. This is the trigger forBy_OrderNum:
- Define similar triggers for BY OrderDate, BY PO, and BY ShipDate.
- For the final item, you want to filter the query to show only those Orders with no ShipDate:
- To try out your new pop-up menu, Run the window and then right-click on the browse to bring up the pop-up:
![]()
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |